Custom Operators

Custom Operators

Using custom operators in Epics can help to make them more readable, as well as helping with types.

For example, here's an Epic that gets some data and filters it by a given predicate:

This is a simple example, but often you may have a chain of filters and maps applied to something.

What if we wanted to filter by numbers, perform some calculation on the numbers, and add them together and return that value? If we did this a lot, we'd have to write a lot of code to do this.

Here's an example of how we can use custom operators to make this more readable:

When used properly it helps make the code more testable and readable, as some Epics can be very long and complex.

Custom Operators